#include <stdio.h>
#include <time.h>
#include "sup_mgr.h"

void get_time(void)
{
	time_t t;
	time(&t);
	pt = localtime(&t);	

	const char* weekday[] = {"日", "一", "二", "三", "四", "五", "六"};

	printf("\t\t\t\t\t%d年%d月%d日 %d:%02d 星期%s\n", pt->tm_year + 1900, pt->tm_mon + 1, pt->tm_mday, pt->tm_hour, pt->tm_min, weekday[pt->tm_wday]);

	if((pt->tm_hour) < 12)		printf("\n\t\t\t\t\t\t早上好\n");

	if((12 < (pt->tm_hour))  && (18 > (pt->tm_hour)))	printf("\n\t\t\t\t\t\t下午好\n");

	if((pt->tm_hour) > 18)		printf("\n\t\t\t\t\t\t晚上好\n");

}
